import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useAuthApi() {
	return {
		authCaptcha: (data: object) => {
			return request<any,AjaxResult>({
				url: '/Auth/captcha',
				method: 'get',
				data,
			});
		},
		loginConfig: (data: object) => {
			return request<any,AjaxResult>({
				url: '/Auth/loginConfig',
				method: 'get',
				data,
			});
		},
		loginUserInfo: (params?: object) => {
			return request<any,AjaxResult>({
				url: '/Auth/UserInfo',
				method: 'get',
				params,
			});
		},
		watermarkConfig: (params?: object) => {
			return request<any,AjaxResult>({
				url: '/Auth/WatermarkConfig',
				method: 'get',
				params,
			});
		},
		getAuthUserInfo: (params?: object) => {
			return request<any,AjaxResult>({
				url: '/Auth/userInfo',
				method: 'get',
				params,
			});
		},
		///api/sysAuth/userInfo
	};
}
